#! venv/Scripts/python
# -*- coding: utf-8 -*-
class SkillClass:
    """
    技能基类
    """

    def __init__(self):
        # 名称
        self.name = "基础攻击"
        # 类别
        self.type = None
        # 伤害系数
        self.damage_coe = None
        # 伤害
        self.damage = 10
        # 伤害次数
        self.atk_time = 1
        # 消耗
        self.cost = 0

    def set_num(self, skill_name, skill_type, skill_damage_coe, cost):
        # 名称
        self.name = skill_name
        # 类别
        self.type = skill_type
        # 伤害
        self.damage_coe = skill_damage_coe
        # 消耗
        self.cost = cost

    def damage_num(self, num):
        try:
            self.damage = int(num) * self.damage
        except TypeError:
            print("伤害计算错误")
        finally:
            return self.damage




